package org.lds.message.center.helloworld.consumer;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.lds.message.center.common.model.request.HelloWorldRequest;
import org.lds.message.center.helloworld.HelloWorldMessageService;
import org.lds.message.center.plugin.core.kafka.MessageServiceKafkaConsumer;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.support.Acknowledgment;

import java.util.List;

public class HelloWorldConsumer extends MessageServiceKafkaConsumer<HelloWorldRequest> {

    public HelloWorldConsumer(HelloWorldMessageService helloWorldMessageService) {
        super(helloWorldMessageService, HelloWorldRequest.class);
    }

    @Override
    @KafkaListener(topics = {"${message-center.hello-world.topic}"}, groupId = "${message-center.hello-world.group-id}")
    public void consume(List<ConsumerRecord<String, String>> records, Acknowledgment ack) {
        super.consume(records, ack);
    }

}
